<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>菜单列表</title>
    <!-- 静态包含,静态包含会把jsp合并过来形成一个整个servlet输出. 动态会多个sevlet的结果合并 -->
    <%@include file="common/head.jsp" %>
    <!-- 引入jstl -->
    <%@include file="common/taglib.jsp" %>
    <!-- 项目公共 JavaScript 文件 -->
    <script src="/resources/js/common/common.js"></script>
    <script src="/resources/js/common/pageHandler.js"></script>
    <script src="/resources/js/menu.js"></script>
</head>
<body>
    <!-- 页面显示部分 -->
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
                <div class="alert fade col-sm-offset-3 col-sm-4 text-center alert-msg" id="alertMsg"></div>
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="searchInput"  value="">
                            <input type="hidden" class="form-control" id="commitInput"  value="">
                            <input type="hidden" class="form-control" id="currentPage"  value="1">
                            <input type="hidden" class="form-control" id="pageNumber"  value="">
                            <input type="hidden" class="form-control" id="totalPage"  value="">
                        </div>
                        <div class="col-sm-9 text-right">
                            <button class="btn btn-default" onclick="zhigong.searchData('menu')">查询</button>
                            <button class="btn btn-default" onclick="zhigong.openModal('menu','new')">新增</button>
                        </div>
                    </div>
                </div>

                <div class="panel panel-default data-table" id="dataTable">
                    <div class="table-responsive">
                        <table class="table table-hover text-center">
                            <thead>
                            <tr>
                                <th>菜单编号</th>
                                <th>名称</th>
                                <th>URL</th>
                                <th>排序</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody id="tbodyList">

                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="page col-sm-12 text-right" id="pageWrap">
                    <ul class="pagination">
                        <li class="disabled"><a href="javascript:void(0);" onclick="prePage(this)">&laquo;</a></li>
                        <li class="active"><a href="javascript:void(0);" onclick="transPage(this, 'menu')">1</a></li>
                        <li><a href="javascript:void(0);" onclick="transPage(this, 'menu')">2</a></li>
                        <li><a href="javascript:void(0);" onclick="transPage(this, 'menu')">3</a></li>
                        <li><a href="javascript:void(0);" onclick="transPage(this, 'menu')">4</a></li>
                        <li><a href="javascript:void(0);" onclick="transPage(this, 'menu')">5</a></li>
                        <li><a href="javascript:void(0);" onclick="nextPage(this)" >&raquo;</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" tabindex="-1" role="dialog" id="dataModal">

        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">菜单维护</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form">
                        <div class="form-group">
                            <label for="id" class="col-sm-2 col-sm-offset-1 control-label">菜单编号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control prikey" id="id" disabled value="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="name" class="col-sm-2 col-sm-offset-1 control-label">菜单名称</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="name" value="" placeholder="请输入菜单名称">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="url" class="col-sm-2 col-sm-offset-1 control-label">URL</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="url" value="" placeholder="请输入URL">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="orderNum" class="col-sm-2 col-sm-offset-1 control-label">显示次序</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="orderNum" value="" placeholder="请输入序号">
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="saveBtn" onclick="zhigong.saveData('menu')">保存</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 删除时弹出 -->
    <input type="hidden" id="common_confirm_btn" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#common_confirm_model">
    <div id="common_confirm_model" class="modal">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h5 class="modal-title"><i class="fa fa-exclamation-circle"></i> <span class="title"></span></h5>
                </div>
                <div class="modal-body small">
                    <p ><span class="message"></span></p>
                </div>
                <div class="modal-footer" >
                    <button type="button" class="btn btn-primary ok" data-dismiss="modal">确认</button>
                    <button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>


</body>
</html>